# -*- coding: utf-8 -*-
# @File     : permissions.py
# @Author   : bingjia
# @Time     : 2020/7/27 16:18
# @Desc     : 用户权限

from ..base.api.permissions import AllowAny
from ..base.api.permissions import IsSuperUser
from ..base.api.permissions import BasePermission


class LeaseServicePermission(BasePermission):
    """
    租赁服务权限
    """
    # 全局权限
    global_perms = None
    enough_perms = IsSuperUser()

    # 增删改查
    list_perms = AllowAny()
    retrieve_perms = AllowAny()
    create_perms = IsSuperUser()
    destroy_perms = IsSuperUser()
    partial_update_perms = IsSuperUser()


class LeaseModelPermission(BasePermission):
    """
    租赁模型权限
    """
    # 全局权限
    global_perms = None
    enough_perms = IsSuperUser()

    # 增删改查
    list_perms = AllowAny()
    retrieve_perms = AllowAny()
    create_perms = IsSuperUser()
    destroy_perms = IsSuperUser()
    partial_update_perms = IsSuperUser()






